<script setup>
	import useAppStore from '@/store/app.js'
	const appStore = useAppStore()
	
	onLaunch(async() => {
		console.log('App Launch')
		appStore.initToken()
        if (!appStore.isLogin) {
            appStore.login()
        }
		
		// const token = await appStore.initToken()
		// const openId = await appStore.getOpenid()
		
		// if (token) {
		// 	appStore.setToken(token)
		// }
		
		// if(openId) {
		// 	appStore.setOpenid(openId)
		// }
	})

	// export default {
	// 	onLaunch: function() {
	// 		console.log('App Launch')
	// 	},
	// 	onShow: function() {
	// 		console.log('App Show')
	// 	},
	// 	onHide: function() {
	// 		console.log('App Hide')
	// 	}
	// }
</script>

<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-plus/index.scss";

	/*每个页面公共css */
	@import url("@/common/scss/public.scss");
	@import url("@/common/scss/common.scss");
</style>